{extend name="public/menu2" /}
{block name='title'}-{$cur.name}{/block}

{block name='content'}

<div class="right_content">
    <ul id="list">
        {foreach $content as $vc}
        <li class="member">
            <p class="image"><img src="{$vc.thumb ?: ''}" alt=""></p>
            <div class="info">
                {$vc.content|raw|default=''}
            </div>
        </li>
        {/foreach}

    </ul>
    <div id="page"></div>
</div>
</div>

{/block}

{block name='script'}
<script src="__STATIC__/index/js/jquery.page.js"></script>

<style>
    #list {
        overflow: hidden;
    }

    #list .member {
        display: flex;
        margin-bottom: 80px;
    }

    #list .member .image {
        margin-right: 30px;
        width: 277px;
        height: 380px;
    }

    #list .member .info {
        flex: 1;
        overflow: hidden;
    }

    #list .member .name {
        font-size: 36px;
        line-height: 1;
    }

    #list .member .name span {
        margin-left: 20px;
        font-size: 24px;
    }

    #list .member .brief {
        margin-top: 30px;
        font-size: 14px;
        line-height: 1.7;
    }
    #list .member .brief p{
        min-height: 14px;
    }
</style>
<script>
    $(function () {
        //获取url参数
        function getQueryValue(key) {
            var match = location.search.match(new RegExp(key + '=([^&]*)'));
            return match && match[1] || '';
        }
        // 当前页码
        var page = getQueryValue("page") || 1;
        page = parseInt(page);
        // 总页数
        var pageCount = '{$total ?: 1}';
        if (pageCount == 1) {
            $("#page").hide();
        }
        $("#page").createPage({
            current: page,
            pageCount: pageCount,
            backFn: function (p) {
                //p是当前页码
                location.href = "?page=" + p;
            }
        });
    })
</script>
{/block}